@include("admin.layout.head")
<body>
<div class="x-body">
    <form class="layui-form" action="/admin/norms" method="post">
        {{csrf_field()}}

        <div class="layui-form-item">
            <div class="layui-form-item">
                <label class="layui-form-label">所属分类</label>
                <div class="layui-input-block">
                    <select name="cate_id" lay-verify="required">
                        @foreach($cates as $cate)
                        <option value="{{$cate->id}}">{{$cate->name}}</option>
                        @endforeach
                    </select>
                </div>
            </div>
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>属性名
            </label>
            <div class="layui-input-inline">
                <input type="text" id="norm" name="name" required="" lay-verify="required"
                       autocomplete="off" value="" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>@if(count($errors)==0)将会成为唯一属性名
                @else
                    @foreach($errors->all() as $error)
                        <span style="color: red">{{$error}}</span>
                    @endforeach
                @endif
            </div>
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>属性值
            </label>
            <div class="layui-input-inline">
                <input type="text" id="norm" name="value" required="" lay-verify="required"
                       autocomplete="off" value="" class="layui-input">
            </div>


        </div>

        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
            </label>
            <button  class="layui-btn" lay-filter="add" lay-submit="">
                增加属性
            </button>
        </div>
    </form>
</div>
</body>

</html>